﻿using System;
using System.Data;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AnyOffice.Components;
using AnyOffice.DAL;


namespace AnyOffice.general.calendar.manage
{
    public partial class delete : ModulePage
    {
       
        protected void Page_Load(object sender, EventArgs e)
        {
            int calId = (Request.QueryString["cal_id"] != null) ? int.Parse(Request.QueryString["cal_id"].ToString()) : 0;
            new CalendarDao().Delete(base.Conn, calId, base.User.Identity.Name);
            base.CloseConn();
            string str = (Request.QueryString["date"] != null) ? Request.QueryString["date"].ToString() : DateTime.Now.ToString("yyyy-MM-dd");
            Response.Redirect("manage.aspx?date=" + str);
        }

    }
}
